home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / lib / gcc-lib / ppc-amigaos / 2.95.1 / sys-include / powerup / ppcpragmas / layers_pragmas.h < prev    next >
C/C++ Source or Header  |  2000-03-13  |  19KB  |  663 lines

  1. /* Automatically generated header! Do not edit! */
  2.  
  3. #ifndef _PPCPRAGMA_LAYERS_H
  4. #define _PPCPRAGMA_LAYERS_H
  5. #ifdef __GNUC__
  6. #ifndef _PPCINLINE__LAYERS_H
  7. #include <powerup/ppcinline/layers.h>
  8. #endif
  9. #else
  10.  
  11. #ifndef POWERUP_PPCLIB_INTERFACE_H
  12. #include <powerup/ppclib/interface.h>
  13. #endif
  14.  
  15. #ifndef POWERUP_GCCLIB_PROTOS_H
  16. #include <powerup/gcclib/powerup_protos.h>
  17. #endif
  18.  
  19. #ifndef NO_PPCINLINE_STDARG
  20. #define NO_PPCINLINE_STDARG
  21. #endif/* SAS C PPC inlines */
  22.  
  23. #ifndef LAYERS_BASE_NAME
  24. #define LAYERS_BASE_NAME LayersBase
  25. #endif /* !LAYERS_BASE_NAME */
  26.  
  27. #define    BeginUpdate(l)    _BeginUpdate(LAYERS_BASE_NAME, l)
  28.  
  29. static __inline LONG
  30. _BeginUpdate(void *LayersBase, struct Layer *l)
  31. {
  32. struct Caos    MyCaos;
  33.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  34. //    MyCaos.M68kStart    =    NULL;
  35. //    MyCaos.M68kSize        =    0;
  36.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  37. //    MyCaos.PPCStart        =    NULL;
  38. //    MyCaos.PPCSize        =    0;
  39.     MyCaos.a0        =(ULONG) l;
  40.     MyCaos.caos_Un.Offset    =    (-78);
  41.     MyCaos.a6        =(ULONG) LayersBase;    
  42.     return((LONG)PPCCallOS(&MyCaos));
  43. }
  44.  
  45. #define    BehindLayer(dummy, layer)    _BehindLayer(LAYERS_BASE_NAME, dummy, layer)
  46.  
  47. static __inline LONG
  48. _BehindLayer(void *LayersBase, long dummy, struct Layer *layer)
  49. {
  50. struct Caos    MyCaos;
  51.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  52. //    MyCaos.M68kStart    =    NULL;
  53. //    MyCaos.M68kSize        =    0;
  54.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  55. //    MyCaos.PPCStart        =    NULL;
  56. //    MyCaos.PPCSize        =    0;
  57.     MyCaos.a0        =(ULONG) dummy;
  58.     MyCaos.a1        =(ULONG) layer;
  59.     MyCaos.caos_Un.Offset    =    (-54);
  60.     MyCaos.a6        =(ULONG) LayersBase;    
  61.     return((LONG)PPCCallOS(&MyCaos));
  62. }
  63.  
  64. #define    CreateBehindHookLayer(li, bm, x0, y0, x1, y1, flags, hook, bm2)    _CreateBehindHookLayer(LAYERS_BASE_NAME, li, bm, x0, y0, x1, y1, flags, hook, bm2)
  65.  
  66. static __inline struct Layer *
  67. _CreateBehindHookLayer(void *LayersBase, struct Layer_Info *li, struct BitMap *bm, long x0, long y0, long x1, long y1, long flags, struct Hook *hook, struct BitMap *bm2)
  68. {
  69. struct Caos    MyCaos;
  70.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  71. //    MyCaos.M68kStart    =    NULL;
  72. //    MyCaos.M68kSize        =    0;
  73.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  74. //    MyCaos.PPCStart        =    NULL;
  75. //    MyCaos.PPCSize        =    0;
  76.     MyCaos.a0        =(ULONG) li;
  77.     MyCaos.a1        =(ULONG) bm;
  78.     MyCaos.d0        =(ULONG) x0;
  79.     MyCaos.d1        =(ULONG) y0;
  80.     MyCaos.d2        =(ULONG) x1;
  81.     MyCaos.d3        =(ULONG) y1;
  82.     MyCaos.d4        =(ULONG) flags;
  83.     MyCaos.a3        =(ULONG) hook;
  84.     MyCaos.a2        =(ULONG) bm2;
  85.     MyCaos.caos_Un.Offset    =    (-192);
  86.     MyCaos.a6        =(ULONG) LayersBase;    
  87.     return((struct Layer *)PPCCallOS(&MyCaos));
  88. }
  89.  
  90. #define    CreateBehindLayer(li, bm, x0, y0, x1, y1, flags, bm2)    _CreateBehindLayer(LAYERS_BASE_NAME, li, bm, x0, y0, x1, y1, flags, bm2)
  91.  
  92. static __inline struct Layer *
  93. _CreateBehindLayer(void *LayersBase, struct Layer_Info *li, struct BitMap *bm, long x0, long y0, long x1, long y1, long flags, struct BitMap *bm2)
  94. {
  95. struct Caos    MyCaos;
  96.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  97. //    MyCaos.M68kStart    =    NULL;
  98. //    MyCaos.M68kSize        =    0;
  99.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  100. //    MyCaos.PPCStart        =    NULL;
  101. //    MyCaos.PPCSize        =    0;
  102.     MyCaos.a0        =(ULONG) li;
  103.     MyCaos.a1        =(ULONG) bm;
  104.     MyCaos.d0        =(ULONG) x0;
  105.     MyCaos.d1        =(ULONG) y0;
  106.     MyCaos.d2        =(ULONG) x1;
  107.     MyCaos.d3        =(ULONG) y1;
  108.     MyCaos.d4        =(ULONG) flags;
  109.     MyCaos.a2        =(ULONG) bm2;
  110.     MyCaos.caos_Un.Offset    =    (-42);
  111.     MyCaos.a6        =(ULONG) LayersBase;    
  112.     return((struct Layer *)PPCCallOS(&MyCaos));
  113. }
  114.  
  115. #define    CreateUpfrontHookLayer(li, bm, x0, y0, x1, y1, flags, hook, bm2)    _CreateUpfrontHookLayer(LAYERS_BASE_NAME, li, bm, x0, y0, x1, y1, flags, hook, bm2)
  116.  
  117. static __inline struct Layer *
  118. _CreateUpfrontHookLayer(void *LayersBase, struct Layer_Info *li, struct BitMap *bm, long x0, long y0, long x1, long y1, long flags, struct Hook *hook, struct BitMap *bm2)
  119. {
  120. struct Caos    MyCaos;
  121.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  122. //    MyCaos.M68kStart    =    NULL;
  123. //    MyCaos.M68kSize        =    0;
  124.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  125. //    MyCaos.PPCStart        =    NULL;
  126. //    MyCaos.PPCSize        =    0;
  127.     MyCaos.a0        =(ULONG) li;
  128.     MyCaos.a1        =(ULONG) bm;
  129.     MyCaos.d0        =(ULONG) x0;
  130.     MyCaos.d1        =(ULONG) y0;
  131.     MyCaos.d2        =(ULONG) x1;
  132.     MyCaos.d3        =(ULONG) y1;
  133.     MyCaos.d4        =(ULONG) flags;
  134.     MyCaos.a3        =(ULONG) hook;
  135.     MyCaos.a2        =(ULONG) bm2;
  136.     MyCaos.caos_Un.Offset    =    (-186);
  137.     MyCaos.a6        =(ULONG) LayersBase;    
  138.     return((struct Layer *)PPCCallOS(&MyCaos));
  139. }
  140.  
  141. #define    CreateUpfrontLayer(li, bm, x0, y0, x1, y1, flags, bm2)    _CreateUpfrontLayer(LAYERS_BASE_NAME, li, bm, x0, y0, x1, y1, flags, bm2)
  142.  
  143. static __inline struct Layer *
  144. _CreateUpfrontLayer(void *LayersBase, struct Layer_Info *li, struct BitMap *bm, long x0, long y0, long x1, long y1, long flags, struct BitMap *bm2)
  145. {
  146. struct Caos    MyCaos;
  147.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  148. //    MyCaos.M68kStart    =    NULL;
  149. //    MyCaos.M68kSize        =    0;
  150.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  151. //    MyCaos.PPCStart        =    NULL;
  152. //    MyCaos.PPCSize        =    0;
  153.     MyCaos.a0        =(ULONG) li;
  154.     MyCaos.a1        =(ULONG) bm;
  155.     MyCaos.d0        =(ULONG) x0;
  156.     MyCaos.d1        =(ULONG) y0;
  157.     MyCaos.d2        =(ULONG) x1;
  158.     MyCaos.d3        =(ULONG) y1;
  159.     MyCaos.d4        =(ULONG) flags;
  160.     MyCaos.a2        =(ULONG) bm2;
  161.     MyCaos.caos_Un.Offset    =    (-36);
  162.     MyCaos.a6        =(ULONG) LayersBase;    
  163.     return((struct Layer *)PPCCallOS(&MyCaos));
  164. }
  165.  
  166. #define    DeleteLayer(dummy, layer)    _DeleteLayer(LAYERS_BASE_NAME, dummy, layer)
  167.  
  168. static __inline LONG
  169. _DeleteLayer(void *LayersBase, long dummy, struct Layer *layer)
  170. {
  171. struct Caos    MyCaos;
  172.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  173. //    MyCaos.M68kStart    =    NULL;
  174. //    MyCaos.M68kSize        =    0;
  175.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  176. //    MyCaos.PPCStart        =    NULL;
  177. //    MyCaos.PPCSize        =    0;
  178.     MyCaos.a0        =(ULONG) dummy;
  179.     MyCaos.a1        =(ULONG) layer;
  180.     MyCaos.caos_Un.Offset    =    (-90);
  181.     MyCaos.a6        =(ULONG) LayersBase;    
  182.     return((LONG)PPCCallOS(&MyCaos));
  183. }
  184.  
  185. #define    DisposeLayerInfo(li)    _DisposeLayerInfo(LAYERS_BASE_NAME, li)
  186.  
  187. static __inline void
  188. _DisposeLayerInfo(void *LayersBase, struct Layer_Info *li)
  189. {
  190. struct Caos    MyCaos;
  191.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  192. //    MyCaos.M68kStart    =    NULL;
  193. //    MyCaos.M68kSize        =    0;
  194.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  195. //    MyCaos.PPCStart        =    NULL;
  196. //    MyCaos.PPCSize        =    0;
  197.     MyCaos.a0        =(ULONG) li;
  198.     MyCaos.caos_Un.Offset    =    (-150);
  199.     MyCaos.a6        =(ULONG) LayersBase;    
  200.     PPCCallOS(&MyCaos);
  201. }
  202.  
  203. #define    DoHookClipRects(hook, rport, rect)    _DoHookClipRects(LAYERS_BASE_NAME, hook, rport, rect)
  204.  
  205. static __inline void
  206. _DoHookClipRects(void *LayersBase, struct Hook *hook, struct RastPort *rport, struct Rectangle *rect)
  207. {
  208. struct Caos    MyCaos;
  209.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  210. //    MyCaos.M68kStart    =    NULL;
  211. //    MyCaos.M68kSize        =    0;
  212.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  213. //    MyCaos.PPCStart        =    NULL;
  214. //    MyCaos.PPCSize        =    0;
  215.     MyCaos.a0        =(ULONG) hook;
  216.     MyCaos.a1        =(ULONG) rport;
  217.     MyCaos.a2        =(ULONG) rect;
  218.     MyCaos.caos_Un.Offset    =    (-216);
  219.     MyCaos.a6        =(ULONG) LayersBase;    
  220.     PPCCallOS(&MyCaos);
  221. }
  222.  
  223. #define    EndUpdate(layer, flag)    _EndUpdate(LAYERS_BASE_NAME, layer, flag)
  224.  
  225. static __inline void
  226. _EndUpdate(void *LayersBase, struct Layer *layer, unsigned long flag)
  227. {
  228. struct Caos    MyCaos;
  229.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  230. //    MyCaos.M68kStart    =    NULL;
  231. //    MyCaos.M68kSize        =    0;
  232.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  233. //    MyCaos.PPCStart        =    NULL;
  234. //    MyCaos.PPCSize        =    0;
  235.     MyCaos.a0        =(ULONG) layer;
  236.     MyCaos.d0        =(ULONG) flag;
  237.     MyCaos.caos_Un.Offset    =    (-84);
  238.     MyCaos.a6        =(ULONG) LayersBase;    
  239.     PPCCallOS(&MyCaos);
  240. }
  241.  
  242. #define    FattenLayerInfo(li)    _FattenLayerInfo(LAYERS_BASE_NAME, li)
  243.  
  244. static __inline LONG
  245. _FattenLayerInfo(void *LayersBase, struct Layer_Info *li)
  246. {
  247. struct Caos    MyCaos;
  248.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  249. //    MyCaos.M68kStart    =    NULL;
  250. //    MyCaos.M68kSize        =    0;
  251.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  252. //    MyCaos.PPCStart        =    NULL;
  253. //    MyCaos.PPCSize        =    0;
  254.     MyCaos.a0        =(ULONG) li;
  255.     MyCaos.caos_Un.Offset    =    (-156);
  256.     MyCaos.a6        =(ULONG) LayersBase;    
  257.     return((LONG)PPCCallOS(&MyCaos));
  258. }
  259.  
  260. #define    InitLayers(li)    _InitLayers(LAYERS_BASE_NAME, li)
  261.  
  262. static __inline void
  263. _InitLayers(void *LayersBase, struct Layer_Info *li)
  264. {
  265. struct Caos    MyCaos;
  266.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  267. //    MyCaos.M68kStart    =    NULL;
  268. //    MyCaos.M68kSize        =    0;
  269.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  270. //    MyCaos.PPCStart        =    NULL;
  271. //    MyCaos.PPCSize        =    0;
  272.     MyCaos.a0        =(ULONG) li;
  273.     MyCaos.caos_Un.Offset    =    (-30);
  274.     MyCaos.a6        =(ULONG) LayersBase;    
  275.     PPCCallOS(&MyCaos);
  276. }
  277.  
  278. #define    InstallClipRegion(layer, region)    _InstallClipRegion(LAYERS_BASE_NAME, layer, region)
  279.  
  280. static __inline struct Region *
  281. _InstallClipRegion(void *LayersBase, struct Layer *layer, struct Region *region)
  282. {
  283. struct Caos    MyCaos;
  284.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  285. //    MyCaos.M68kStart    =    NULL;
  286. //    MyCaos.M68kSize        =    0;
  287.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  288. //    MyCaos.PPCStart        =    NULL;
  289. //    MyCaos.PPCSize        =    0;
  290.     MyCaos.a0        =(ULONG) layer;
  291.     MyCaos.a1        =(ULONG) region;
  292.     MyCaos.caos_Un.Offset    =    (-174);
  293.     MyCaos.a6        =(ULONG) LayersBase;    
  294.     return((struct Region *)PPCCallOS(&MyCaos));
  295. }
  296.  
  297. #define    InstallLayerHook(layer, hook)    _InstallLayerHook(LAYERS_BASE_NAME, layer, hook)
  298.  
  299. static __inline struct Hook *
  300. _InstallLayerHook(void *LayersBase, struct Layer *layer, struct Hook *hook)
  301. {
  302. struct Caos    MyCaos;
  303.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  304. //    MyCaos.M68kStart    =    NULL;
  305. //    MyCaos.M68kSize        =    0;
  306.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  307. //    MyCaos.PPCStart        =    NULL;
  308. //    MyCaos.PPCSize        =    0;
  309.     MyCaos.a0        =(ULONG) layer;
  310.     MyCaos.a1        =(ULONG) hook;
  311.     MyCaos.caos_Un.Offset    =    (-198);
  312.     MyCaos.a6        =(ULONG) LayersBase;    
  313.     return((struct Hook *)PPCCallOS(&MyCaos));
  314. }
  315.  
  316. #define    InstallLayerInfoHook(li, hook)    _InstallLayerInfoHook(LAYERS_BASE_NAME, li, hook)
  317.  
  318. static __inline struct Hook *
  319. _InstallLayerInfoHook(void *LayersBase, struct Layer_Info *li, struct Hook *hook)
  320. {
  321. struct Caos    MyCaos;
  322.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  323. //    MyCaos.M68kStart    =    NULL;
  324. //    MyCaos.M68kSize        =    0;
  325.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  326. //    MyCaos.PPCStart        =    NULL;
  327. //    MyCaos.PPCSize        =    0;
  328.     MyCaos.a0        =(ULONG) li;
  329.     MyCaos.a1        =(ULONG) hook;
  330.     MyCaos.caos_Un.Offset    =    (-204);
  331.     MyCaos.a6        =(ULONG) LayersBase;    
  332.     return((struct Hook *)PPCCallOS(&MyCaos));
  333. }
  334.  
  335. #define    LockLayer(dummy, layer)    _LockLayer(LAYERS_BASE_NAME, dummy, layer)
  336.  
  337. static __inline void
  338. _LockLayer(void *LayersBase, long dummy, struct Layer *layer)
  339. {
  340. struct Caos    MyCaos;
  341.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  342. //    MyCaos.M68kStart    =    NULL;
  343. //    MyCaos.M68kSize        =    0;
  344.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  345. //    MyCaos.PPCStart        =    NULL;
  346. //    MyCaos.PPCSize        =    0;
  347.     MyCaos.a0        =(ULONG) dummy;
  348.     MyCaos.a1        =(ULONG) layer;
  349.     MyCaos.caos_Un.Offset    =    (-96);
  350.     MyCaos.a6        =(ULONG) LayersBase;    
  351.     PPCCallOS(&MyCaos);
  352. }
  353.  
  354. #define    LockLayerInfo(li)    _LockLayerInfo(LAYERS_BASE_NAME, li)
  355.  
  356. static __inline void
  357. _LockLayerInfo(void *LayersBase, struct Layer_Info *li)
  358. {
  359. struct Caos    MyCaos;
  360.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  361. //    MyCaos.M68kStart    =    NULL;
  362. //    MyCaos.M68kSize        =    0;
  363.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  364. //    MyCaos.PPCStart        =    NULL;
  365. //    MyCaos.PPCSize        =    0;
  366.     MyCaos.a0        =(ULONG) li;
  367.     MyCaos.caos_Un.Offset    =    (-120);
  368.     MyCaos.a6        =(ULONG) LayersBase;    
  369.     PPCCallOS(&MyCaos);
  370. }
  371.  
  372. #define    LockLayers(li)    _LockLayers(LAYERS_BASE_NAME, li)
  373.  
  374. static __inline void
  375. _LockLayers(void *LayersBase, struct Layer_Info *li)
  376. {
  377. struct Caos    MyCaos;
  378.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  379. //    MyCaos.M68kStart    =    NULL;
  380. //    MyCaos.M68kSize        =    0;
  381.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  382. //    MyCaos.PPCStart        =    NULL;
  383. //    MyCaos.PPCSize        =    0;
  384.     MyCaos.a0        =(ULONG) li;
  385.     MyCaos.caos_Un.Offset    =    (-108);
  386.     MyCaos.a6        =(ULONG) LayersBase;    
  387.     PPCCallOS(&MyCaos);
  388. }
  389.  
  390. #define    MoveLayer(dummy, layer, dx, dy)    _MoveLayer(LAYERS_BASE_NAME, dummy, layer, dx, dy)
  391.  
  392. static __inline LONG
  393. _MoveLayer(void *LayersBase, long dummy, struct Layer *layer, long dx, long dy)
  394. {
  395. struct Caos    MyCaos;
  396.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  397. //    MyCaos.M68kStart    =    NULL;
  398. //    MyCaos.M68kSize        =    0;
  399.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  400. //    MyCaos.PPCStart        =    NULL;
  401. //    MyCaos.PPCSize        =    0;
  402.     MyCaos.a0        =(ULONG) dummy;
  403.     MyCaos.a1        =(ULONG) layer;
  404.     MyCaos.d0        =(ULONG) dx;
  405.     MyCaos.d1        =(ULONG) dy;
  406.     MyCaos.caos_Un.Offset    =    (-60);
  407.     MyCaos.a6        =(ULONG) LayersBase;    
  408.     return((LONG)PPCCallOS(&MyCaos));
  409. }
  410.  
  411. #define    MoveLayerInFrontOf(layer_to_move, other_layer)    _MoveLayerInFrontOf(LAYERS_BASE_NAME, layer_to_move, other_layer)
  412.  
  413. static __inline LONG
  414. _MoveLayerInFrontOf(void *LayersBase, struct Layer *layer_to_move, struct Layer *other_layer)
  415. {
  416. struct Caos    MyCaos;
  417.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  418. //    MyCaos.M68kStart    =    NULL;
  419. //    MyCaos.M68kSize        =    0;
  420.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  421. //    MyCaos.PPCStart        =    NULL;
  422. //    MyCaos.PPCSize        =    0;
  423.     MyCaos.a0        =(ULONG) layer_to_move;
  424.     MyCaos.a1        =(ULONG) other_layer;
  425.     MyCaos.caos_Un.Offset    =    (-168);
  426.     MyCaos.a6        =(ULONG) LayersBase;    
  427.     return((LONG)PPCCallOS(&MyCaos));
  428. }
  429.  
  430. #define    MoveSizeLayer(layer, dx, dy, dw, dh)    _MoveSizeLayer(LAYERS_BASE_NAME, layer, dx, dy, dw, dh)
  431.  
  432. static __inline LONG
  433. _MoveSizeLayer(void *LayersBase, struct Layer *layer, long dx, long dy, long dw, long dh)
  434. {
  435. struct Caos    MyCaos;
  436.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  437. //    MyCaos.M68kStart    =    NULL;
  438. //    MyCaos.M68kSize        =    0;
  439.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  440. //    MyCaos.PPCStart        =    NULL;
  441. //    MyCaos.PPCSize        =    0;
  442.     MyCaos.a0        =(ULONG) layer;
  443.     MyCaos.d0        =(ULONG) dx;
  444.     MyCaos.d1        =(ULONG) dy;
  445.     MyCaos.d2        =(ULONG) dw;
  446.     MyCaos.d3        =(ULONG) dh;
  447.     MyCaos.caos_Un.Offset    =    (-180);
  448.     MyCaos.a6        =(ULONG) LayersBase;    
  449.     return((LONG)PPCCallOS(&MyCaos));
  450. }
  451.  
  452. #define    NewLayerInfo()    _NewLayerInfo(LAYERS_BASE_NAME)
  453.  
  454. static __inline struct Layer_Info *
  455. _NewLayerInfo(void *LayersBase)
  456. {
  457. struct Caos    MyCaos;
  458.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  459. //    MyCaos.M68kStart    =    NULL;
  460. //    MyCaos.M68kSize        =    0;
  461.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  462. //    MyCaos.PPCStart        =    NULL;
  463. //    MyCaos.PPCSize        =    0;
  464.     MyCaos.caos_Un.Offset    =    (-144);
  465.     MyCaos.a6        =(ULONG) LayersBase;    
  466.     return((struct Layer_Info *)PPCCallOS(&MyCaos));
  467. }
  468.  
  469. #define    ScrollLayer(dummy, layer, dx, dy)    _ScrollLayer(LAYERS_BASE_NAME, dummy, layer, dx, dy)
  470.  
  471. static __inline void
  472. _ScrollLayer(void *LayersBase, long dummy, struct Layer *layer, long dx, long dy)
  473. {
  474. struct Caos    MyCaos;
  475.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  476. //    MyCaos.M68kStart    =    NULL;
  477. //    MyCaos.M68kSize        =    0;
  478.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  479. //    MyCaos.PPCStart        =    NULL;
  480. //    MyCaos.PPCSize        =    0;
  481.     MyCaos.a0        =(ULONG) dummy;
  482.     MyCaos.a1        =(ULONG) layer;
  483.     MyCaos.d0        =(ULONG) dx;
  484.     MyCaos.d1        =(ULONG) dy;
  485.     MyCaos.caos_Un.Offset    =    (-72);
  486.     MyCaos.a6        =(ULONG) LayersBase;    
  487.     PPCCallOS(&MyCaos);
  488. }
  489.  
  490. #define    SizeLayer(dummy, layer, dx, dy)    _SizeLayer(LAYERS_BASE_NAME, dummy, layer, dx, dy)
  491.  
  492. static __inline LONG
  493. _SizeLayer(void *LayersBase, long dummy, struct Layer *layer, long dx, long dy)
  494. {
  495. struct Caos    MyCaos;
  496.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  497. //    MyCaos.M68kStart    =    NULL;
  498. //    MyCaos.M68kSize        =    0;
  499.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  500. //    MyCaos.PPCStart        =    NULL;
  501. //    MyCaos.PPCSize        =    0;
  502.     MyCaos.a0        =(ULONG) dummy;
  503.     MyCaos.a1        =(ULONG) layer;
  504.     MyCaos.d0        =(ULONG) dx;
  505.     MyCaos.d1        =(ULONG) dy;
  506.     MyCaos.caos_Un.Offset    =    (-66);
  507.     MyCaos.a6        =(ULONG) LayersBase;    
  508.     return((LONG)PPCCallOS(&MyCaos));
  509. }
  510.  
  511. #define    SortLayerCR(layer, dx, dy)    _SortLayerCR(LAYERS_BASE_NAME, layer, dx, dy)
  512.  
  513. static __inline void
  514. _SortLayerCR(void *LayersBase, struct Layer *layer, long dx, long dy)
  515. {
  516. struct Caos    MyCaos;
  517.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  518. //    MyCaos.M68kStart    =    NULL;
  519. //    MyCaos.M68kSize        =    0;
  520.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  521. //    MyCaos.PPCStart        =    NULL;
  522. //    MyCaos.PPCSize        =    0;
  523.     MyCaos.a0        =(ULONG) layer;
  524.     MyCaos.d0        =(ULONG) dx;
  525.     MyCaos.d1        =(ULONG) dy;
  526.     MyCaos.caos_Un.Offset    =    (-210);
  527.     MyCaos.a6        =(ULONG) LayersBase;    
  528.     PPCCallOS(&MyCaos);
  529. }
  530.  
  531. #define    SwapBitsRastPortClipRect(rp, cr)    _SwapBitsRastPortClipRect(LAYERS_BASE_NAME, rp, cr)
  532.  
  533. static __inline void
  534. _SwapBitsRastPortClipRect(void *LayersBase, struct RastPort *rp, struct ClipRect *cr)
  535. {
  536. struct Caos    MyCaos;
  537.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  538. //    MyCaos.M68kStart    =    NULL;
  539. //    MyCaos.M68kSize        =    0;
  540.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  541. //    MyCaos.PPCStart        =    NULL;
  542. //    MyCaos.PPCSize        =    0;
  543.     MyCaos.a0        =(ULONG) rp;
  544.     MyCaos.a1        =(ULONG) cr;
  545.     MyCaos.caos_Un.Offset    =    (-126);
  546.     MyCaos.a6        =(ULONG) LayersBase;    
  547.     PPCCallOS(&MyCaos);
  548. }
  549.  
  550. #define    ThinLayerInfo(li)    _ThinLayerInfo(LAYERS_BASE_NAME, li)
  551.  
  552. static __inline void
  553. _ThinLayerInfo(void *LayersBase, struct Layer_Info *li)
  554. {
  555. struct Caos    MyCaos;
  556.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  557. //    MyCaos.M68kStart    =    NULL;
  558. //    MyCaos.M68kSize        =    0;
  559.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  560. //    MyCaos.PPCStart        =    NULL;
  561. //    MyCaos.PPCSize        =    0;
  562.     MyCaos.a0        =(ULONG) li;
  563.     MyCaos.caos_Un.Offset    =    (-162);
  564.     MyCaos.a6        =(ULONG) LayersBase;    
  565.     PPCCallOS(&MyCaos);
  566. }
  567.  
  568. #define    UnlockLayer(layer)    _UnlockLayer(LAYERS_BASE_NAME, layer)
  569.  
  570. static __inline void
  571. _UnlockLayer(void *LayersBase, struct Layer *layer)
  572. {
  573. struct Caos    MyCaos;
  574.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  575. //    MyCaos.M68kStart    =    NULL;
  576. //    MyCaos.M68kSize        =    0;
  577.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  578. //    MyCaos.PPCStart        =    NULL;
  579. //    MyCaos.PPCSize        =    0;
  580.     MyCaos.a0        =(ULONG) layer;
  581.     MyCaos.caos_Un.Offset    =    (-102);
  582.     MyCaos.a6        =(ULONG) LayersBase;    
  583.     PPCCallOS(&MyCaos);
  584. }
  585.  
  586. #define    UnlockLayerInfo(li)    _UnlockLayerInfo(LAYERS_BASE_NAME, li)
  587.  
  588. static __inline void
  589. _UnlockLayerInfo(void *LayersBase, struct Layer_Info *li)
  590. {
  591. struct Caos    MyCaos;
  592.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  593. //    MyCaos.M68kStart    =    NULL;
  594. //    MyCaos.M68kSize        =    0;
  595.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  596. //    MyCaos.PPCStart        =    NULL;
  597. //    MyCaos.PPCSize        =    0;
  598.     MyCaos.a0        =(ULONG) li;
  599.     MyCaos.caos_Un.Offset    =    (-138);
  600.     MyCaos.a6        =(ULONG) LayersBase;    
  601.     PPCCallOS(&MyCaos);
  602. }
  603.  
  604. #define    UnlockLayers(li)    _UnlockLayers(LAYERS_BASE_NAME, li)
  605.  
  606. static __inline void
  607. _UnlockLayers(void *LayersBase, struct Layer_Info *li)
  608. {
  609. struct Caos    MyCaos;
  610.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  611. //    MyCaos.M68kStart    =    NULL;
  612. //    MyCaos.M68kSize        =    0;
  613.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  614. //    MyCaos.PPCStart        =    NULL;
  615. //    MyCaos.PPCSize        =    0;
  616.     MyCaos.a0        =(ULONG) li;
  617.     MyCaos.caos_Un.Offset    =    (-114);
  618.     MyCaos.a6        =(ULONG) LayersBase;    
  619.     PPCCallOS(&MyCaos);
  620. }
  621.  
  622. #define    UpfrontLayer(dummy, layer)    _UpfrontLayer(LAYERS_BASE_NAME, dummy, layer)
  623.  
  624. static __inline LONG
  625. _UpfrontLayer(void *LayersBase, long dummy, struct Layer *layer)
  626. {
  627. struct Caos    MyCaos;
  628.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  629. //    MyCaos.M68kStart    =    NULL;
  630. //    MyCaos.M68kSize        =    0;
  631.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  632. //    MyCaos.PPCStart        =    NULL;
  633. //    MyCaos.PPCSize        =    0;
  634.     MyCaos.a0        =(ULONG) dummy;
  635.     MyCaos.a1        =(ULONG) layer;
  636.     MyCaos.caos_Un.Offset    =    (-48);
  637.     MyCaos.a6        =(ULONG) LayersBase;    
  638.     return((LONG)PPCCallOS(&MyCaos));
  639. }
  640.  
  641. #define    WhichLayer(li, x, y)    _WhichLayer(LAYERS_BASE_NAME, li, x, y)
  642.  
  643. static __inline struct Layer *
  644. _WhichLayer(void *LayersBase, struct Layer_Info *li, long x, long y)
  645. {
  646. struct Caos    MyCaos;
  647.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  648. //    MyCaos.M68kStart    =    NULL;
  649. //    MyCaos.M68kSize        =    0;
  650.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  651. //    MyCaos.PPCStart        =    NULL;
  652. //    MyCaos.PPCSize        =    0;
  653.     MyCaos.a0        =(ULONG) li;
  654.     MyCaos.d0        =(ULONG) x;
  655.     MyCaos.d1        =(ULONG) y;
  656.     MyCaos.caos_Un.Offset    =    (-132);
  657.     MyCaos.a6        =(ULONG) LayersBase;    
  658.     return((struct Layer *)PPCCallOS(&MyCaos));
  659. }
  660.  
  661. #endif /* SASC Pragmas */
  662. #endif /* !_PPCPRAGMA_LAYERS_H */
  663.